package com.rimi.bean;

public class PageBean {

	private int nowPage = 1;
	private int count;
	private int totalPage;
	private int pageSize = 4;

	private int start;

	// 起始行数
	public int getStart() {
		
		return (nowPage - 1) * pageSize;
	}

	public void setStart(int start) {
		this.start = start;
	}

	public int getNowPage() {
		return nowPage;
	}

	public void setNowPage(int nowPage) {
		this.nowPage = nowPage;
	}

	public int getCount() {
		return count;
	}

	public void setCount(int count) {
		this.count = count;
	}

	public int getTotalPage() {
		if(count==1) {
			count=2;
			return (count-1)/4+1;
		}
		if(count==0) {
			
			return 1;
		}
		return (count-1)/4+1;
	}

	public void setTotalPage(int totalPage) {
		this.totalPage = totalPage;
	}

	public int getPageSize() {
		return pageSize;
	}

	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}

	public PageBean(int nowPage, int count, int totalPage, int pageSize) {
		super();
		this.nowPage = nowPage;
		this.count = count;
		this.totalPage = totalPage;
		this.pageSize = pageSize;
	}

	public PageBean() {
		super();
	}

}
